package com.zf.yichat.api.dto.request;

import com.zf.yichat.utils.YiChatMsgCode;
import org.hibernate.validator.internal.util.Contracts;

import java.math.BigDecimal;

public class SandPayRequest extends FsRequest{
    private BigDecimal money;

    public String getClientIp() {
        return clientIp;
    }

    public void setClientIp(String clientIp) {
        this.clientIp = clientIp;
    }

    private String  clientIp;
    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }
    @Override
    public void valid() {
        Contracts.assertNotNull(money, YiChatMsgCode.SYSTEM_PARAM_ERROR.msg());
        Contracts.assertTrue(money.compareTo(BigDecimal.ZERO) > 0, YiChatMsgCode.SYSTEM_PARAM_ERROR.msg());
    }
}
